  {% load static from staticfiles %}
<head>
  <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.0.3.min.js"> </script>
  <link media="print, projection, screen" type="text/css" href="{{ STATIC_URL }}themes/blue/style.css" rel="stylesheet">
  <link media="print, projection, screen" type="text/css" href="{{ STATIC_URL }}css/jq.css" rel="stylesheet">
  <script type="text/javascript" src="{{ STATIC_URL }}js/jquery.tablesorter.min.js"> </script>
</head>

Payment request: <br/>
current points: 
	<form name="paymentForm" id="paymentForm"  method="post" action="/member/merchant/payment/submit/">
	<label for="amount">points:</label> 
	<input id="amount" name="amount" value="{{user.points}}"> <br/>
	<input type="submit" value="payme!" id="submitButton">	
	{% csrf_token %}
	</form>
	
{% if messages %}
    {% for message in messages %}
       {{ message }} <br/>
    {% endfor %}
{% endif %}

<table id="reqApprovalMerchantTable" class="tablesorter">
    <thead> 
    	<tr> 
    		<th>Submit Date</th>
    		<th>Update Date</th>
    		<th>Amount</th>
    		<th>Bank name</th>
    		<th>Status</th>
    		<th>Action</th>
    		<th>Comment</th>
    	</tr> 
    </thead> 
    <tbody>
      {% for payment in user.payments.all %}
        {% if not payment.isCanceled%}
        <tr>
  			<td>
  				{{payment.cretion_date}}
  			</td>
  			<td>
  				{{payment.update_date}}
  			</td>
  			<td>
  				{{payment.amount}}
  			</td>
  			<td>
  				{{user.bank.bank_name}}
  			</td>
  			<td>
  				{{payment.getStatus}}
  			</td>
  			<td>
  			     {% if payment.isPending %}
  					<a href="/member/merchant/payment/cancel/{{payment.id}}/"> Cancel request </a> <br/>
  				 {% endif %}
  			</td>
  			<td>
  				{{payment.rejection_comment}}
  			</td>
  		</tr>
  		{% endif %}
  	  {% endfor %}		
    </tbody>
 </table>